package com.jm.test.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import lombok.Data;
import org.apache.commons.lang.StringUtils;

/**
 * @TableName client_business
 */
@TableName(value ="client_business")
@Data
public class ClientBusiness implements Serializable {
    private Long id;

    private String corpname;

    private String apikey;

    private String ipAddress;

    private Integer isCallback;

    private String callbackUrl;

    private String clientLinkname;

    private String clientPhone;

    private String clientFilters;

    private Date created;

    private Long createId;

    private Date updated;

    private Long updateId;

    private Integer isDelete;

    private String extend1;

    private String extend2;

    private String extend3;

    private String extend4;

    private static final long serialVersionUID = 1L;

    public List<String> getIpAddresses() {
        String ips = ipAddress;
        if(!StringUtils.isEmpty(ips)){
            return Arrays.asList(ips.split(","));
        }
        return null;
    }
}